<?php
namespace app\validate;

use think\Validate;

class AdvertValidate extends Validate {
    protected $rule = [
        'file_url'  => 'require|url',
        'jump_type' => 'require|in:0,1,2',
        'jump_url' => 'string',
        'sort'     => 'number',
        'is_show'  => 'in:0,1'
    ];

    protected $message = [
        'file_url.require' => '图片地址必须',
        'jump_type.require' => '跳转类型必须',
        'jump_url.requireIf' => '跳转地址必须'
    ];
}